﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *
 **/

using System;

namespace Peter.Common.Services
{
   /// <summary>
   /// Interface for a timer.
   /// </summary>
   public interface ITimerService
   {
      /// <summary>
      /// Callback funtion. It will execute when the timer interval has elapsed.
      /// </summary>
      EventHandler OnTimerTick { get; set; }

      /// <summary>
      /// Timer interval in milliseconds.
      /// </summary>
      double Interval { get; set; }

      /// <summary>
      /// Starts the timer
      /// </summary>
      void Start ();

      /// <summary>
      /// Stop the Timer
      /// </summary>
      void StopTimer ();
   }
}
